<!DOCTYPE html>
<html>
<!-- Created by GNU Texinfo 7.1, https://www.gnu.org/software/texinfo/ -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<!-- Copyright © 1988-2023 Free Software Foundation, Inc.

Permission is granted to copy, distribute and/or modify this document
under the terms of the GNU Free Documentation License, Version 1.3 or
any later version published by the Free Software Foundation; with the
Invariant Sections being "Funding Free Software", the Front-Cover
Texts being (a) (see below), and with the Back-Cover Texts being (b)
(see below).  A copy of the license is included in the section entitled
"GNU Free Documentation License".

(a) The FSF's Front-Cover Text is:

A GNU Manual

(b) The FSF's Back-Cover Text is:

You have freedom to copy and modify this GNU Manual, like GNU
     software.  Copies published by the Free Software Foundation raise
     funds for GNU development. -->
<title>Alignment Output (GNU Compiler Collection (GCC) Internals)</title>

<meta name="description" content="Alignment Output (GNU Compiler Collection (GCC) Internals)">
<meta name="keywords" content="Alignment Output (GNU Compiler Collection (GCC) Internals)">
<meta name="resource-type" content="document">
<meta name="distribution" content="global">
<meta name="Generator" content="makeinfo">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href="index.html" rel="start" title="Top">
<link href="Option-Index.html" rel="index" title="Option Index">
<link href="index.html#SEC_Contents" rel="contents" title="Table of Contents">
<link href="Assembler-Format.html" rel="up" title="Assembler Format">
<link href="Exception-Region-Output.html" rel="prev" title="Exception Region Output">
<style type="text/css">
<!--
a.copiable-link {visibility: hidden; text-decoration: none; line-height: 0em}
span:hover a.copiable-link {visibility: visible}
strong.def-name {font-family: monospace; font-weight: bold; font-size: larger}
-->
</style>


</head>

<body lang="en">
<div class="subsection-level-extent" id="Alignment-Output">
<div class="nav-panel">
<p>
Previous: <a href="Exception-Region-Output.html" accesskey="p" rel="prev">Assembler Commands for Exception Regions</a>, Up: <a href="Assembler-Format.html" accesskey="u" rel="up">Defining the Output Assembler Language</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>
<hr>
<h4 class="subsection" id="Assembler-Commands-for-Alignment"><span>18.20.10 Assembler Commands for Alignment<a class="copiable-link" href="#Assembler-Commands-for-Alignment"> &para;</a></span></h4>

<p>This describes commands for alignment.
</p>
<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-JUMP_005fALIGN"><span class="category-def">Macro: </span><span><strong class="def-name">JUMP_ALIGN</strong> <var class="def-var-arguments">(<var class="var">label</var>)</var><a class="copiable-link" href="#index-JUMP_005fALIGN"> &para;</a></span></dt>
<dd><p>The alignment (log base 2) to put in front of <var class="var">label</var>, which is
a common destination of jumps and has no fallthru incoming edge.
</p>
<p>This macro need not be defined if you don&rsquo;t want any special alignment
to be done at such a time.  Most machine descriptions do not currently
define the macro.
</p>
<p>Unless it&rsquo;s necessary to inspect the <var class="var">label</var> parameter, it is better
to set the variable <var class="var">align_jumps</var> in the target&rsquo;s
<code class="code">TARGET_OPTION_OVERRIDE</code>.  Otherwise, you should try to honor the user&rsquo;s
selection in <var class="var">align_jumps</var> in a <code class="code">JUMP_ALIGN</code> implementation.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LABEL_005fALIGN_005fAFTER_005fBARRIER"><span class="category-def">Macro: </span><span><strong class="def-name">LABEL_ALIGN_AFTER_BARRIER</strong> <var class="def-var-arguments">(<var class="var">label</var>)</var><a class="copiable-link" href="#index-LABEL_005fALIGN_005fAFTER_005fBARRIER"> &para;</a></span></dt>
<dd><p>The alignment (log base 2) to put in front of <var class="var">label</var>, which follows
a <code class="code">BARRIER</code>.
</p>
<p>This macro need not be defined if you don&rsquo;t want any special alignment
to be done at such a time.  Most machine descriptions do not currently
define the macro.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LOOP_005fALIGN"><span class="category-def">Macro: </span><span><strong class="def-name">LOOP_ALIGN</strong> <var class="def-var-arguments">(<var class="var">label</var>)</var><a class="copiable-link" href="#index-LOOP_005fALIGN"> &para;</a></span></dt>
<dd><p>The alignment (log base 2) to put in front of <var class="var">label</var> that heads
a frequently executed basic block (usually the header of a loop).
</p>
<p>This macro need not be defined if you don&rsquo;t want any special alignment
to be done at such a time.  Most machine descriptions do not currently
define the macro.
</p>
<p>Unless it&rsquo;s necessary to inspect the <var class="var">label</var> parameter, it is better
to set the variable <code class="code">align_loops</code> in the target&rsquo;s
<code class="code">TARGET_OPTION_OVERRIDE</code>.  Otherwise, you should try to honor the user&rsquo;s
selection in <code class="code">align_loops</code> in a <code class="code">LOOP_ALIGN</code> implementation.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-LABEL_005fALIGN"><span class="category-def">Macro: </span><span><strong class="def-name">LABEL_ALIGN</strong> <var class="def-var-arguments">(<var class="var">label</var>)</var><a class="copiable-link" href="#index-LABEL_005fALIGN"> &para;</a></span></dt>
<dd><p>The alignment (log base 2) to put in front of <var class="var">label</var>.
If <code class="code">LABEL_ALIGN_AFTER_BARRIER</code> / <code class="code">LOOP_ALIGN</code> specify a different alignment,
the maximum of the specified values is used.
</p>
<p>Unless it&rsquo;s necessary to inspect the <var class="var">label</var> parameter, it is better
to set the variable <code class="code">align_labels</code> in the target&rsquo;s
<code class="code">TARGET_OPTION_OVERRIDE</code>.  Otherwise, you should try to honor the user&rsquo;s
selection in <code class="code">align_labels</code> in a <code class="code">LABEL_ALIGN</code> implementation.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fOUTPUT_005fSKIP"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_OUTPUT_SKIP</strong> <var class="def-var-arguments">(<var class="var">stream</var>, <var class="var">nbytes</var>)</var><a class="copiable-link" href="#index-ASM_005fOUTPUT_005fSKIP"> &para;</a></span></dt>
<dd><p>A C statement to output to the stdio stream <var class="var">stream</var> an assembler
instruction to advance the location counter by <var class="var">nbytes</var> bytes.
Those bytes should be zero when loaded.  <var class="var">nbytes</var> will be a C
expression of type <code class="code">unsigned HOST_WIDE_INT</code>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fNO_005fSKIP_005fIN_005fTEXT"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_NO_SKIP_IN_TEXT</strong><a class="copiable-link" href="#index-ASM_005fNO_005fSKIP_005fIN_005fTEXT"> &para;</a></span></dt>
<dd><p>Define this macro if <code class="code">ASM_OUTPUT_SKIP</code> should not be used in the
text section because it fails to put zeros in the bytes that are skipped.
This is true on many Unix systems, where the pseudo&ndash;op to skip bytes
produces no-op instructions rather than zeros when used in the text
section.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fOUTPUT_005fALIGN"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_OUTPUT_ALIGN</strong> <var class="def-var-arguments">(<var class="var">stream</var>, <var class="var">power</var>)</var><a class="copiable-link" href="#index-ASM_005fOUTPUT_005fALIGN"> &para;</a></span></dt>
<dd><p>A C statement to output to the stdio stream <var class="var">stream</var> an assembler
command to advance the location counter to a multiple of 2 to the
<var class="var">power</var> bytes.  <var class="var">power</var> will be a C expression of type <code class="code">int</code>.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fOUTPUT_005fALIGN_005fWITH_005fNOP"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_OUTPUT_ALIGN_WITH_NOP</strong> <var class="def-var-arguments">(<var class="var">stream</var>, <var class="var">power</var>)</var><a class="copiable-link" href="#index-ASM_005fOUTPUT_005fALIGN_005fWITH_005fNOP"> &para;</a></span></dt>
<dd><p>Like <code class="code">ASM_OUTPUT_ALIGN</code>, except that the &ldquo;nop&rdquo; instruction is used
for padding, if necessary.
</p></dd></dl>

<dl class="first-deffn first-defmac-alias-first-deffn">
<dt class="deffn defmac-alias-deffn" id="index-ASM_005fOUTPUT_005fMAX_005fSKIP_005fALIGN"><span class="category-def">Macro: </span><span><strong class="def-name">ASM_OUTPUT_MAX_SKIP_ALIGN</strong> <var class="def-var-arguments">(<var class="var">stream</var>, <var class="var">power</var>, <var class="var">max_skip</var>)</var><a class="copiable-link" href="#index-ASM_005fOUTPUT_005fMAX_005fSKIP_005fALIGN"> &para;</a></span></dt>
<dd><p>A C statement to output to the stdio stream <var class="var">stream</var> an assembler
command to advance the location counter to a multiple of 2 to the
<var class="var">power</var> bytes, but only if <var class="var">max_skip</var> or fewer bytes are needed to
satisfy the alignment request.  <var class="var">power</var> and <var class="var">max_skip</var> will be
a C expression of type <code class="code">int</code>.
</p></dd></dl>

</div>
<hr>
<div class="nav-panel">
<p>
Previous: <a href="Exception-Region-Output.html">Assembler Commands for Exception Regions</a>, Up: <a href="Assembler-Format.html">Defining the Output Assembler Language</a> &nbsp; [<a href="index.html#SEC_Contents" title="Table of contents" rel="contents">Contents</a>][<a href="Option-Index.html" title="Index" rel="index">Index</a>]</p>
</div>



</body>
</html>
